/**
 * Created by Administrator on 2016/10/12.
 */
$(document).scroll(function(){
    var scrollTop=$(this).scrollTop();
    var num=parseInt($("#number").text());
    var num1=parseInt($("#number1").text());
    if (scrollTop>=89) {
        $(".right_float").css({"display":"block"});
    }else{
        $(".right_float").css({"display":"none"});
    }
    function func(){
        if(scrollTop>=300){
            timer=setInterval(autoForward,1);
            function autoForward(){
                num=num+25;
                num1=num1+1;
                if(num>5000){
                    clearInterval(timer);
                    return;
                }
                $("#number").text(num);
                $("#number1").text(num1);
            }
        }
    }
    func();
});